<%--
  Created by IntelliJ IDEA.
  User: 86180
  Date: 2020/12/21
  Time: 9:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <%@include file="/pages/common/head.jsp"%>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录界面</title>
    <style>
      #login-box{
        border:1px solid blue ;
        width: 30%;
        text-align: center;
        margin: 0 auto;
        margin-top: 15%;
        background: #cde6c7;
        padding:20px 50px;
        opacity: 0.8;
      }

      #login-box h1{
        color:white;
      }

      #login-box .form .item input{
        width: 200px;
        border: 0;
        border-bottom:5px solid white;
        font-size: 18px;
        background: whitesmoke;
        color: black;
        padding: 5px 10px;
      }

      .button1 input{
        margin-left: 50px;

      }

      .button2
      {

        width: 200px;
        height: 50px;
        margin-top: 18px;
        font-size: 18px;
        border-radius: 50%;
        color: white;
        border-radius: 25px;
        background-image: linear-gradient(to right ,#deab8a,#f7acbc,#ef5b9c);
      }


    </style>

    <script type="text/javascript">
      $(function () {



        <c:if test="${ not empty requestScope.alert}">
          alert("${requestScope.alert}");
        </c:if>






        var href;
        $("#student").click(function () {
          href="studentServlet?action=login";
        })
        $("#teacher").click(function () {
          href="teacherServlet?action=login";
        })

        $("button.button2").click(function () {
          $("form.login").attr("action",href).submit();

        })


      });

    </script>
  </head>
  <body background="img/1.png" style="background-repeat: no-repeat; background-size: 100% 100%; background-attachment: fixed;">
  <form  class="login" action="" method="post">
    <div id="login-box">
      <h1 style="color: skyblue;">LOGIN</h1>
      <div class="form">
        <div class="item">
          <input type="text" name="id"  placeholder="学号或者工号">
        </div>
        <br>
        <div class="item">
          <input type="password" placeholder="密码" name="password">
        </div>
      </div>

      <div>
        <div class="button1">
          <input type="radio" id="student" value="学生"  style="margin-left: 5px;" name="shengfen">学生
          <input type="radio" id="teacher"  value="老师"  name="shengfen">老师
        </div>
      </div>
      <button    class=" button2" type="submit">登录</button>
    </div>
    </div>
  </form>
  </body>
</html>
